<?php	
	session_start();
	if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start();
	define( "_SBKH_" , 1 );
	require_once( '../define.php' );
	require_once( CONFIG . 'Route.class.php' );
	require_once( CONFIG . 'gFunction.php' );
	if(isset($_SESSION['expire'])){
		$now = time();
		if($now > $_SESSION['expire']){
			SBKH::redirect("users/logout",true);
		}
	}
	if(getController() != ""){
		Route::SwitchPage(getController());
	}else{
		if(!isset($_SESSION['user'])) SBKH::redirect("users/login");
		else $route = new Route();
	}
?>